package com.drakulo.hi.logic.inventory;

import org.newdawn.slick.Image;
import org.newdawn.slick.SlickException;

import com.drakulo.hi.gfx.ImageFactory;
import com.drakulo.hi.gfx.Item;
import com.drakulo.hi.logic.inventory.equipment.Weapon;
import com.drakulo.hi.logic.io.Resources;

/**
 * 
 */
public class ItemFactory {
	/**
	 * Identifiant d'équipement unique pour tout équipement
	 */
	private static int lastItemID;

	public static Item getItem() throws SlickException {
		// TODO gestion des Items? Comment je fais?
		Image sprite = ImageFactory.createFromSpriteSheet(Resources.SWORDS.path(), 32, 32, 0, 0);
		return new Weapon("Oigon", sprite, 10, 5);
	}

	public static Item getItem2() throws SlickException {
		// TODO gestion des Items? Comment je fais?
		Image sprite = ImageFactory.createFromSpriteSheet(Resources.SWORDS.path(), 32, 32, 0, 2);
		return new Weapon("WTF", sprite, 10, 5);
	}

	/**
	 * @return le prochain ID unique
	 */
	public static int getNextUniqueItemID() {
		lastItemID++;
		return lastItemID;
	}

}
